$(document).ready(function() {
	$( ".portfolio-container" ).addClass("ui-widget");
	$( ".portfolio-table-div table th" ).addClass("ui-widget-header");
	$( "td" ).addClass("ui-widget-content");
	$( ".portfolio-table-div table" ).addClass("ui-widget-content");
	$( ".portfolio-table-div" ).hide().show("drop",1000);
	$( ".portfolio-container h3, .portfolio-container h4" ).hide().show("fade",1000);
	$.getJSON('assets/data/portfolio.json', function(data){
	    $.each(data.portfolio, function(index, investment){
			$( ".portfolio-table-div table" ).append(
				'<tr>'+
				'	<td> '+investment.farmer+' </td>'+
				'	<td> '+investment.crop+' </td>'+
				'	<td> '+investment.date+' </td>'+
				'	<td align="right"> '+investment.invested+' </td>'+
				'	<td align="center"> '+investment.period+' </td>'+
				'	<td align="right"> '+investment.returned+' </td>'+
				'</tr>'
			);
	    });
	}).fail(function(){
		alert("Fail: maybe the portfolio data does not exists or is not json...");
	});
});